package com.ruoyi.ora.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ora.mapper.AssetsRecycleMapper;
import com.ruoyi.ora.domain.AssetsRecycle;
import com.ruoyi.ora.service.IAssetsRecycleService;

/**
 * 回收站Service业务层处理
 * 
 * @author liuwp
 * @date 2025-05-20
 */
@Service
public class AssetsRecycleServiceImpl implements IAssetsRecycleService 
{
    @Autowired
    private AssetsRecycleMapper assetsRecycleMapper;

    /**
     * 查询回收站
     * 
     * @param id 回收站主键
     * @return 回收站
     */
    @Override
    public AssetsRecycle selectAssetsRecycleById(Long id)
    {
        return assetsRecycleMapper.selectAssetsRecycleById(id);
    }

    /**
     * 查询回收站列表
     * 
     * @param assetsRecycle 回收站
     * @return 回收站
     */
    @Override
    public List<AssetsRecycle> selectAssetsRecycleList(AssetsRecycle assetsRecycle)
    {
        return assetsRecycleMapper.selectAssetsRecycleList(assetsRecycle);
    }

    /**
     * 根据业务主键查询一条记录：回收站
     *
     * @param assetsRecycle 回收站
     * @return 回收站
     */
    @Override
    public AssetsRecycle selectOneAssetsRecycle(AssetsRecycle assetsRecycle)
    {
        return assetsRecycleMapper.selectOneAssetsRecycle(assetsRecycle);
    }

    /**
     * 新增回收站
     * 
     * @param assetsRecycle 回收站
     * @return 结果
     */
    @Override
    public int insertAssetsRecycle(AssetsRecycle assetsRecycle)
    {
        assetsRecycle.setCreateTime(DateUtils.getNowDate());
        return assetsRecycleMapper.insertAssetsRecycle(assetsRecycle);
    }

    /**
     * 修改回收站
     * 
     * @param assetsRecycle 回收站
     * @return 结果
     */
    @Override
    public int updateAssetsRecycle(AssetsRecycle assetsRecycle)
    {
        return assetsRecycleMapper.updateAssetsRecycle(assetsRecycle);
    }

    @Override
    public int updateAssetsRecycleCondition(AssetsRecycle assetsRecycle, AssetsRecycle assetsRecycleCondition)
    {
        return assetsRecycleMapper.updateAssetsRecycleCondition(assetsRecycle, assetsRecycleCondition);
    }

    /**
     * 批量删除回收站
     * 
     * @param ids 需要删除的回收站主键
     * @return 结果
     */
    @Override
    public int deleteAssetsRecycleByIds(Long[] ids)
    {
        return assetsRecycleMapper.deleteAssetsRecycleByIds(ids);
    }

    /**
     * 删除回收站信息
     * 
     * @param id 回收站主键
     * @return 结果
     */
    @Override
    public int deleteAssetsRecycleById(Long id)
    {
        return assetsRecycleMapper.deleteAssetsRecycleById(id);
    }

    /**
     * 条件删除回收站
     *
     * @param assetsRecycle 回收站
     * @return 结果
     */
    @Override
    public int deleteAssetsRecycleByCondition(AssetsRecycle assetsRecycle)
    {
        return assetsRecycleMapper.deleteAssetsRecycleByCondition(assetsRecycle);
    }

}
